package bpm.dao.impl.user;

import java.sql.PreparedStatement;
import java.sql.SQLException;
import java.util.List;

import org.springframework.jdbc.core.BatchPreparedStatementSetter;

import bpm.domain.user.Account;

//FIXME refine
public class AccountBatchPreparedStatementSetter implements
		BatchPreparedStatementSetter {
	private List<Account> accounts;
	
	public AccountBatchPreparedStatementSetter() {}
	public AccountBatchPreparedStatementSetter(List<Account> accounts) {
		this.accounts = accounts;
	}

	public int getBatchSize() {
		return this.accounts.size();
	}

	public void setValues(PreparedStatement pstmt, int i) throws SQLException {
		//pstmt.setString(1, accounts.get(i).getId());
//		pstmt.setInt(2, accounts.get(i).getOwner().getId());
//		pstmt.setString(3, accounts.get(i).getOwner().getName());
//		pstmt.setInt(4, accounts.get(i).getDepartment().getId());
//		//pstmt.setInt(5, accounts.get(i).getNumLocked());
//		//pstmt.setInt(6, accounts.get(i).getNumActive());
//		pstmt.setString(7, accounts.get(i).getDescription());
	}

}
